package com.sq.universe.system.service.impl;

import com.sq.universe.base.service.impl.BaseServiceImpl;
import com.sq.universe.system.dao.TableConfigurationDao;
import com.sq.universe.system.entity.TableConfigurationEntity;
import com.sq.universe.system.service.TableConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TableConfigurationServiceImpl extends BaseServiceImpl<TableConfigurationEntity,TableConfigurationDao> implements TableConfigurationService {

    @Autowired
    private TableConfigurationDao tableConfigurationDao;

    public Integer insert(TableConfigurationEntity tableConfigurationEntity){
        tableConfigurationDao.deleteByTableName(tableConfigurationEntity.getTcTableName());
        tableConfigurationDao.insert(tableConfigurationEntity);
        return tableConfigurationEntity.getTcId();
    }
}
